<template>
  <div class="Child">
    子组件 --- {{car.name}}---{{car.price}}
    ---{{sum}}
  </div>
</template>

<script>
import {ref} from 'vue'
export default {    
    name:'Child',
    props:['car'],
    setup(){
      let sum = ref(0)
      console.log(sum);
      return new Promise((resolve,reject)=>{
        setTimeout(()=>{
          resolve({sum})
        },2000)
      })
    }
}
</script>

<style>
    .Child{ 
        background-color: skyblue;
        padding: 10px;
    }
</style>